<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<include file='Common:head'/>
<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>首页</li>
    <li>友情链接</li>
  </ul>
</div>
<div class="rightinfo">
<form action="{:U('Link/sorts')}" method="post" >
  <div class="tools">
    <ul class="toolbar">
      <a href="{:U('Link/add')}"><li><span><img src="__PUBLIC__/Admin/images/t01.png" /></span>添加</li></a> 	  
      <a href="#"><li><span><img src="__PUBLIC__/Admin/images/t01.png"/></span>
		<input type="submit" value="提交排序" style="text-align:center; line-height:inherit;"></li>
      </a>
    </ul>
  </div>
  <table class="tablelist">
    <thead>
      <tr>
        <th>ID</th>
        <th>名称</th>
        <th>地址</th>
        <th>排序</th>
        <th>图片</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <foreach name="link" item="v">
        <tr id='{$v.id}' pid='{$v.pid}'>
          <td>{$v['id']}</td>
          <td>{$v['name']}</td>
          <td>{$v['url']}</td>
          <td align="center">
          <input type="text" name="{$v['id']}" value="{$v['sort']}" style="width:50px; height:30px; border:1px solid #CCC; text-align:center; line-height:30px;">
          </td>
			<td>
            <if condition=" $v['pic'] neq '' "><img src="__ROOT__/{$v['pic']}" width="80" height="40">
            	<else /><img src="<?php echo C('NO_PIC');?>"  width="80" height="40">
            </if>    
            </td>
          <td>
<a href="{:U('Link/edit',array('id' => $v['id']))}" class="tablelink">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp; 
<a href="{:U('Link/del',array('id' => $v['id']))}" class="tablelink" onclick="return confirm('确实要删除吗？')">删除</a>&nbsp;&nbsp;

          </td>
        </tr>
      </foreach>
    </tbody>
  </table>
</form> 
</div>
</body>
</html>
